<template>
  <div>
    <ul>
      <li v-if="item === 2" v-for="(item, index) in list" :key="item">{{ item }}</li>
    </ul>
  </div>
</template>

<script setup>
const list = [1, 2, 3, 4, 5, 6]
</script>

<style lang="css" scoped></style>